<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>用户信息管理</title>
    <%@ include file="../au_inc.jsp" %>
    <style type="text/css">
table.gridtable {
    font-family: verdana,arial,sans-serif;
    font-size:11px;
    color:#333333;
    border-width: 1px;
    border-color: #666666;
    border-collapse: collapse;
}
table.gridtable th {
    border-width: 1px;
    padding: 1px;
    border-style: solid;
    border-color: #666666;
    background-color: #dedede;
}
table.gridtable td {
    border-width: 1px;
    padding: 1px;
    border-style: solid;
    border-color: #666666;
    background-color: #ffffff;
}
</style>
	<script type="text/javascript">
	//所有的子窗体都需要有一个save函数，当点击弹出窗体的保存按钮时所进行的操作
	function btnSave_click()
	{
	    var fun_ret = false;
	
	   var vals =$('#formModule').serialize();
	   var url = '${baseUrl }/admin/users/save';
	   var valid = $('#formModule').form('validate');
	   if(valid){
		   $.ajax({
		       async: false, 
		       type: "POST", 
		       url : url,
		       data:vals,
		       cache:false,
		       dataType : 'json', 
		       success : function(data) { 
		           if(data.success!=0)
		           {
		               top.Ext.Msg.alert("提示",data.msg);
		           }
		           else
		           {
		               fun_ret = true;
		           }
		       } 
		   });
	   }
	   return fun_ret;
	}
	</script>
  </head>
  <body>
        <div style="padding:0px">
        <form id="formModule" method="post">
            <input id="id" type="hidden" name="users.user_id" value="${users.user_id }">
            <table cellpadding="0" border="0" width="100%" class="gridtable">
                <tr>
                    <td rowspan="6" width="120"><img alt="" src="${baseUrl}/ali_icon/m_04.jpg" width="120" height="160"></td>
                    <th>用户名称：</th>
                    <td><input id="user_name" class="easyui-validatebox textbox" type="text" name="users.user_name" data-options="required:true" value="${users.user_name }"></input></td>
                    <th>用户性别：</th>
                    <td><select id="sex" name="users.sex">
                            <option value="男" <c:if test="${users.sex=='男'}">selected</c:if>>男</option>
                            <option value="女" <c:if test="${users.sex=='女'}">selected</c:if>>女</option>
                        </select></td>
                </tr>
                <tr>
                    <th>登录名称：</th>
                    <td><input id="login_name" class="easyui-validatebox textbox" type="text" name="users.login_name" data-options="required:true" value="${users.login_name }"></input></td>
                    <th>登录密码：</th>
                    <td><input id="password" class="easyui-validatebox textbox" type="password" name="users.password" data-options="required:true"></input></td>
                </tr>
                <tr>
                    <th>联系电话:</th>
                    <td><input id="phone" class="textbox" type="text" name="users.phone"  value="${users.phone }"></input></td>
                    <th>联系QQ:</th>
                    <td><input id="qq" class="textbox" type="text" name="users.qq"  value="${users.qq }"></input></td>
                </tr>
                <tr>
                    <th>EMail:</th>
                    <td><input id="email" class="textbox" type="text" name="users.email" value="${users.email }"></input></td>
                    <th>添加时间:</th>
                    <td><input id="reg_time" class="textbox" type="text" name="reg_time" value="${users.reg_time }" readonly="readonly"></input></td>
                </tr>
                <tr>
                    <th>联系地址:</th>
                    <td colspan="3"><input id="address" class="textbox" type="text" style="width:300px" name="users.address" value="${users.address }"></input></td>
                </tr>
                <tr>
                    <th>所属组:</th>
                    <td><input id="groupId" name="users.group_id" value="${users.group_id}" class="easyui-combobox" style="width:200px;" data-options="required:true,valueField:'id',textField:'group_name',url:'${baseUrl }/admin/groups/showEnableGroups',panelHeight:150">
                        </input></td>
                    <th>帐号状态:</th>
                    <td><select id="status" name="users.status">
                            <option value="9" <c:if test="${users.status==9}">selected</c:if>>启用</option>
                            <option value="0" <c:if test="${users.status==0}">selected</c:if>>禁用</option>
                        </select></td>
                </tr>
                <tr>
                    <th>简介:</th>
                    <td colspan="4"><textarea rows="6" cols="80" name="users.desction" id="desction" value="${users.desction }" style="width:100%;"></textarea></td>
                </tr>
            </table>
        </form>
        </div>
  </body>
</html>
